/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package negocio;

import datos.PrendaBD;
import datos.UsuarioBD;
import datos.defectoBD;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;

/**
 *
 * @author pablo
 */
public class Prendas {
     private ArrayList prendas = new ArrayList();

    public void listar() {
        try {
            PrendaBD prendaBD = new PrendaBD();
            setPrendas(prendaBD.listar());
        } catch (SQLException ex) {
            System.out.println("Error al listar vestuarios/prendas");
        }
    }

     public void listar3() {
        try {
            PrendaBD prendaBD = new PrendaBD();
            setPrendas(prendaBD.busquedaLavado());
        } catch (SQLException ex) {
            Logger.getLogger(Usuarios.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    public ArrayList getPrendas() {
        return prendas;
    }

    public void setPrendas(ArrayList prendas) {
        this.prendas = prendas;
    }
    defectoBD defectobd;
    public DefaultComboBoxModel comboGrados(){
         try {
             defectobd = new defectoBD();
             return defectobd.comboGrados();
         } catch (SQLException ex) {
             Logger.getLogger(Prendas.class.getName()).log(Level.SEVERE, null, ex);
         }
         return null;
    }
}
